Skip to content

Update plugin list on maintenance branch to keep stable docs current#14538

Open
dyollb wants to merge 1 commit into
pytest-dev:mainfrom
dyollb:fix-plugin-list-stable-docs
Open

Update plugin list on maintenance branch to keep stable docs current#14538
dyollb wants to merge 1 commit into
pytest-dev:mainfrom
dyollb:fix-plugin-list-stable-docs

Conversation

@dyollb
Copy link
Copy Markdown

@dyollb dyollb commented May 31, 2026

Summary

docs.pytest.org/en/stable is built from the current maintenance branch (e.g. 9.0.x), not main. The weekly plugin list update only creates PRs against main, so the stable docs always show a frozen plugin list from the time of the release cut.

Fix

Add a second job update-plugin-list-stable to the workflow that:

  1. Dynamically detects the latest maintenance branch (highest N.N.x branch) via git ls-remote
  2. Checks it out, runs the same tox -e update-plugin-list update
  3. Creates a draft PR targeting that maintenance branch

The branch detection is version-sorted so it correctly finds e.g. 9.0.x over 8.4.x.

Also adds the missing if: steps.pr.outputs.pull-request-number guard to the "Instruct maintainers" step in the original job (without it the gh pr comment call would fail when there are no plugin list changes).

Testing

The logic can be verified locally:

git ls-remote --heads https://github.com/pytest-dev/pytest.git \
  | grep -oE 'refs/heads/[0-9]+\.[0-9]+\.x' \
  | sed 's|refs/heads/||' \
  | sort -t. -k1,1n -k2,2n \
  | tail -1
# → 9.0.x

The weekly plugin list update only targets `main`, which means
docs.pytest.org/en/stable (built from the maintenance branch, e.g.
9.0.x) always shows a stale plugin list frozen at the time of release.

Add a second job that dynamically finds the latest maintenance branch
and creates a PR to update plugin_list.rst there too.
@dyollb dyollb marked this pull request as ready for review May 31, 2026 12:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant